<template>
  <div class="main">
    <div class="main_box">
      <div class="main_gif_box">
        <img class="main_gif" v-lazy="imgurl" alt="" />
        <h1 class="hello">Hello ThreeCube</h1>
      </div>
      <div class="main_btn">
        <router-link to="/createHome">
          <el-button type="info"
                     plain>创建房间</el-button>
        </router-link>
        <router-link to="/joinHome"
                     class="two">
          <el-button type="info"
                     plain>加入房间</el-button>
        </router-link>
        <router-link to="/home/true">
          <el-button type="info"
                     plain>离线模式</el-button>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      imgurl: 'http://47.99.54.252:8000/cube1.gif'
    }
  }
}
</script>

<style scoped>
.main {
  max-width: 40rem;
  margin: auto;
  min-height: 100vh;
  text-align: center;
}
.main_box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.main_gif_box {
  width: 100%;
  height: 0;
  overflow: hidden;
  padding-bottom: 66%;
  background-color: rgb(246, 246, 246);
}
.main_gif {
  width: 45rem;
  margin-top: -4rem;
  moz-user-select: -moz-none;
  -moz-user-select: none;
  -o-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.hello {
  margin-top: -5rem;
  font-size: 4rem;
}
.main_btn {
  margin-top: 4rem;
}
.el-button {
  font-size: 16px;
}
.two {
  margin: 0 1rem;
}
</style>
